﻿using System;

namespace Homework3
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Random random = new System.Random();
            ShapeType[] types = System.Enum.GetValues(typeof(ShapeType)) as ShapeType[];
            int size = 10;
            IShape[] shapes = new IShape[size];
            ShapeFactory shapeFactory = new ShapeFactory();
            for (int i = 0; i < size; i++)
            {
                shapes[i] = shapeFactory.GetShape(types[random.Next(types.Length)]);
            }
            double area = 0;
            string valids = "";
            foreach (var shape in shapes)
            {
                valids += shape.IsValid()+" ";
                area += shape.GetArea();
            }
            System.Console.WriteLine(valids+"\n"+ area);
            Console.ReadKey();
        }
    }
}
